<?php 
    //检测验证码是否正确
	header("content-type:text/html;charset=utf-8");
    $tel = $_GET['tel'];
    $code = $_GET['code'];
    $redis = new Redis(); 
	$redis->connect("127.0.0.1",6379);  
	$redis->auth("Hispot1!");
	$prestore_code = $redis->get($tel);
    if ($prestore_code != $code) {
        echo 0;
    }else{
        $redis->del($tel);
    	echo 1;
    }
 ?>